package com.yanmaohu.yulia.bean;

import com.yanmaohu.yulia.statement.SqlExecutableStatement;

import java.util.List;

public class SqlExecutableStatementList {

    private int beginIndex;
    private int endIndex;
    private List<SqlExecutableStatement> sqlExecutableStatementList;

    public SqlExecutableStatementList(List<SqlExecutableStatement> sqlExecutableStatementList) {
        this.beginIndex = sqlExecutableStatementList.get(0).getBeginIndex();
        this.endIndex = sqlExecutableStatementList.get(sqlExecutableStatementList.size() - 1).getEndIndex();
        this.sqlExecutableStatementList = sqlExecutableStatementList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return sqlExecutableStatementList.size();
    }

    public SqlExecutableStatement get(int index) {
        return sqlExecutableStatementList.get(index);
    }

}
